import request from '../utils/request';

// 获取用户收藏的菜谱
export const getFavoriteRecipes = async (userId) => {
  return request.get(`/favorite/favorite/list/${userId}`);
}

// 添加收藏
export const addFavorite = async (data) => {
  return request.post('/favorite/favorite/add', data);
}


// 取消收藏
export const removeFavorite = async (data) => {
  return request.delete('/favorite/favorite/remove', data);
}

// 检查是否已收藏
export const checkFavorite = async (data) => {
  return request.get('/favorite/favorite/isFavorite',  data );
}
